package com.ygp.lock.rlock;

import com.ygp.utils.Sleeper;
import lombok.extern.slf4j.Slf4j;

/**
 * <Description> <br>
 *
 * @author linmiaolai@sanyygp.com<br>
 * @version 1.0<br>
 * @date 2021/11/15 <br>
 */
@Slf4j(topic = "c.bigRoom")
public class BigRoom {
//    private final Object studyRoom = new Object();
//    private final Object bedRoom = new Object();
    public void sleep() {
        synchronized (this) {
            log.debug("sleeping 2 小时");
            Sleeper.sleep(2);
        }
    }

    public void study() {
        synchronized (this) {
            log.debug("study 1 小时");
            Sleeper.sleep(1);
        }
    }
}
